﻿<%
class ActionLib
	public sub index
		Mo.Assign "title","类库调用演示"
		Mo.display "home:top"
		F.echo "<h3>Base64测试：</h3>"
		Set Base64 = Mo("Base64")
		F.echo "Base64程序测试 => " & Base64.Encode("Base64程序测试") & "<br />"
		F.echo "QmFzZTY056iL5bqP5rWL6K+V => " & Base64.DecodeAny("QmFzZTY056iL5bqP5rWL6K+V","utf-8") & "<br />"
		F.echo "QmFzZTY056iL5bqP5rWL6K+V => " & Base64.DecodeUTF8("QmFzZTY056iL5bqP5rWL6K+V") & "<br />"
		Response.Charset="utf-8"
		F.echo "QmFzZTY056iL5bqP5rWL6K+V => " & Base64.Decode("QmFzZTY056iL5bqP5rWL6K+V")
		
		F.echo "<h3>Net库测试：</h3>"
		Mo.Use "Net"
		F.echo "202.75.217.9(IsIp) => " & MoLibNet.IsIP("202.75.217.9") & "<br />"
		F.echo "202.75.267.9(IsIp) => " & MoLibNet.IsIP("202.75.267.9") & "<br />"
		F.echo "202.75.217.9 => " & MoLibNet.IpToLong("202.75.217.9") & "<br />"
		F.echo "3393968393 => " & MoLibNet.LongToIp("3393968393") & "<br />"
		F.echo "202.75.217.9/32,202.75.217.9(InSameNetWork) => " & MoLibNet.InSameNetWork("202.75.217.9/32","202.75.217.9") & "<br />"
		F.echo "202.75.217.9/32,202.75.217.8(InSameNetWork) => " & MoLibNet.InSameNetWork("202.75.217.9/32","202.75.217.8") & "<br />"
		F.echo "202.75.217.9/32,202.75.217.8(InSameNetWork) => " & MoLibNet.InSameNetWork("202.75.217.9/24","202.75.217.8") & "<br />"
		F.echo "202.75.217.9/255.255.255.0,202.75.217.8(InSameNetWork) => " & MoLibNet.InSameNetWork("202.75.217.9/255.255.255.0","202.75.217.8") & "<br />"
		
		F.echo "<h3>SHA1库测试：</h3>"
		Mo.Use "SHA1"
		F.echo "测试asp => " & MoLibSHA1.SHA1("测试asp") & "<br />"
		F.echo "测试asp(对SHA1进行混淆) => " & MoLibSHA1.SHA2("测试asp") & "<br />"

		F.echo "<h3>XOR简单加解密测试：</h3>"
		Mo.Use "XOR"
		F.echo "测试asp => " & MoLibXOR.encrypt("测试asp","password") & "<br />"
		F.echo "700c3873fcba131700 => " & MoLibXOR.decrypt("700c3873fcba131700","password") & "<br />"
		
		
		F.echo "<h3>调用拼音库（App/Library/Extend/Mo.Lib.Pinyin.asp），将汉字转为拼音：</h3>"
		Set Pinyin = Mo("Pinyin")
		Pinyin.DataSource = F.mappath("App/Data/py.db")
		str = "我测试清理蜻蜓游玩啊"
		F.echo str & "<br />"
		F.echo Pinyin.GetPy(str)
		Mo.display "home:foot"
	end sub
end class
%>